<?php
namespace Admin\Model;
use Think\Model\ViewModel;

/*
 * 代理添加之间的关联模型
 * 代理推荐表 - 代理审核表
 * */
class AgentRecommendedViewModel extends ViewModel
{
    public $viewFields = array(

        'recommended' => array(
            'add_agent','beadd_agent' ,'add_time' ,'type_',
            '_type' => 'LEFT'
        ),
        'agent' => array(
            'rank_id',
            '_on' => 'agent.agent_id = recommended.beadd_agent',
            '_type' => 'LEFT'
        ),
        'agent_rank' => array(
            'rank_name','rank_grade',
            '_on' => 'agent_rank.rank_id = agent.rank_id' ,
            '_type' => 'LEFT'
        ),
        'agent_audit' => array(
            'is_agree',
            '_on' => 'agent_audit.agent_id = recommended.add_agent' ,
            '_type' => 'LEFT'
        ),
    );
}